/*
 * @Author       : NaN 353362604@qq.com
 * @Date         : 2023-06-01 10:00:03
 * @LastEditTime : 2023-07-13 15:29:26
 * @LastEditors  : NaN 353362604@qq.com
 * @FilePath     : \AdminStration\src\Common\Router\MenuNav\ThrRouter\UserGroupDetail.jsx
 * @Description  :
 */
import { API_LIST } from '../../../Api/Api'
import { commonTableList } from '../Common/common'

export const UserGroupDetail = async ({ twoData, ClientData }) => {
    let dataList = {
        uuid: twoData.uuid,
        isCheckbox: true,
        width: 1000,
        pageSize: 10,
        params: { pageIndex: 1, UserGroupUuid: twoData.uuid },
        get: API_LIST()['getNoUserGroupList'],
        pos: 'posUserGroupDetail',
        assemblyData: e => {
            return e.map(key => ({
                userUuid: key.uuid,
                userGroupUuid: twoData.uuid,
            }))
        },
        columns: [
            commonTableList.uuid,
            {
                dataIndex: 'organizationUuid',
                title: '组织机构',
                rules: true,
                valueType: 'select',
                valueEnum: ClientData.organization,
                ellipsis: true,
                hideInTable: true,
            },
            {
                dataIndex: 'organizationName',
                title: '组织机构',
                rules: true,
                valueType: 'input',
                ellipsis: true,
                hideInSearch: true,
            },
            { ...commonTableList.tableName, title: '账户', hideInSearch: false },
            { ...commonTableList.fullName, title: '姓名', hideInSearch: false },
            {
                dataIndex: 'idCard',
                title: '身份证',
                rules: true,
                valueType: 'input',
                ellipsis: true,
            },
        ],
    }

    return dataList
}
